<div id="wrapper">
	<!--左侧导航开始-->
	<?=\app\widgets\MenuWidget::widget();?>
	<!--左侧导航结束-->
	<!--右侧部分开始-->
	<div id="page-wrapper" class="gray-bg dashbard-1">
		<?=$this->render('@app/modules/admin/views/layouts/inc_naver');?>
		<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>用户组 <small>权限分配</small></h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="commentForm" method="post" action="/admin/admin/create">
							<div class="form-group">
								<label class="col-sm-3 control-label" for="group_id">用户组</label>
								<div class="col-sm-4">
									<select id="groupId" class="form-control valid" name="Admin[groupId]" aria-invalid="false">
										<?php foreach ($groupList as $list):?>
										<option value="<?php echo $list['id']?>" <?php if (isset($data['groupId']) && $list['id'] == $data['groupId']):?>selected="selected"<?php endif;?>><?php echo $list['groupName']?></option>
										<?php endforeach;?>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">登陆名：</label>
								<div class="col-sm-4">
									<input id="cname" name="Admin[userName]" value="<?php echo isset($data['userName']) ? $data['userName'] : '';?>" minlength="2" type="text" class="form-control" required="" aria-required="true">
									<input id="" type="hidden" class="form-control" name="Admin[id]" value="<?php echo $id?>" >
									<input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">真实姓名：</label>
								<div class="col-sm-4">
									<input id="creal" type="text" class="form-control" name="Admin[realName]" value="<?php echo isset($data['realName']) ? $data['realName'] : '';?>" required="" aria-required="true">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">密码：</label>
								<div class="col-sm-4">
									<input id="cpasseord" type="password" class="form-control" name="Admin[password]" <?php if (!$id):?> required="" aria-required="true"><?php endif;?><?php if ($id):?><label class="col-sm-0 control-label" for="Admin_password">不当改动登录名时必须填写密码，否则不填则不修改密码</label><?php endif;?>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">邮箱：</label>
								<div class="col-sm-4">
									<input id="cemail" type="email" class="form-control" name="Admin[email]" value="<?php echo isset($data['email']) ? $data['email'] : '';?>" >
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="group_id">用户状态：</label>
								<div class="col-sm-4">
									<select id="groupId" class="form-control valid" name="Admin[statusIs]" aria-invalid="false">
										<option value="1" <?php if (isset($data['statusIs']) && $data['statusIs'] == 1):?>selected="selected"<?php endif;?>>已激活</option>
										<option value="0" <?php if (isset($data['statusIs']) && $data['statusIs'] == 0):?>selected="selected"<?php endif;?>>未激活</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="is_lock">是否锁定：</label>
								<div class="col-sm-4">
<!--									<input name="isLock" type="checkbox" id="is_lock" value="1" <?php /*if ((isset($data['isLock']) && $data['isLock'] == '1')): */?> checked="checked" <?php /*endif; */?>/>&nbsp;&nbsp;勾选则用户锁定，否则不锁定
-->
									<input type="radio" name="Admin[isLock]" id="is_lock0" value="0" style="width:15px;" <?php echo (isset($data['isLock']) && $data['isLock'] == '0') ? 'checked' : ''; ?>>
									否&nbsp;
									<input type="radio" name="Admin[isLock]" id="is_lock1" value="1" style="width:15px;" <?php echo (isset($data['isLock']) && $data['isLock'] == '1') ? 'checked' : ''; ?>>
									是
								</div>

							</div>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-3">
									<button class="btn btn-primary" type="submit">提交</button>
									<a class="btn btn-white" href="/admin/admin/index">取消</a>
									<!--<button class="btn btn-white" type="submit" onclick="window.location.href='/admin/admin/index'">取消</button>-->
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		</div>
	</div>
	<!--右侧部分结束-->
</div>
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/static/js/plugins/peity/jquery.peity.min.js"></script>
<script src="/static/js/plugins/iCheck/icheck.min.js"></script>
